package com.hao.base;

import android.app.Activity;
import android.os.Bundle;

import com.hao.loading.LoadingUtils;

/**
 * Created by hao on 16/10/19.
 */
public class BaseActiivty extends Activity {

    private LoadingUtils loadingUtils;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (this.loadingUtils == null)
            this.loadingUtils = new LoadingUtils(this);
    }


    public LoadingUtils getLoadingUtils() {
        return this.loadingUtils;
    }


    @Override
    protected void onDestroy() {
        //必调
        if (this.loadingUtils != null)
            this.loadingUtils.onDestroy();
        this.loadingUtils = null;
        super.onDestroy();
    }
}
